home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
cmdity
/
yk212src.lha
/
Yak_2.12_Src
/
WBStartup
/
FullWorkBench.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-18
|
2KB
|
99 lines
#include <string.h>
#include <stdlib.h>
#include <proto/intuition.h>
#include <proto/exec.h>
#include <exec/ports.h>
#include <dos/dos.h>
#include <proto/dos.h>
#include <dos/notify.h>
#include <exec/memory.h>
#include "FullWorkbench.h"
VOID
MakeOtherBackdropsVisible( struct Screen *WBScreen )
{
struct Window *Backdrop;
/* if there are other backdrop windows, bring them to front */
/* For instance, some title screen clocks */
Forbid();
Backdrop = WBScreen->FirstWindow;
while (Backdrop)
{
if ((Backdrop->Flags & WFLG_BACKDROP) &&
!(Backdrop->Flags & WFLG_WBENCHWINDOW))
{
WindowToFront(Backdrop);
}
Backdrop = Backdrop->NextWindow;
}
Permit();
}
VOID
ToggleFullWorkbench ( BOOL Toggle)
{
struct Screen *WBScreen;
struct Window *WBWin;
if (WBScreen = (struct Screen *)LockPubScreen("Workbench"))
{
/* Find the backdrop window of the workbench if it exists */
Forbid();
WBWin = WBScreen->FirstWindow;
while (WBWin && !((WBWin->Flags & WFLG_BACKDROP) && (WBWin->Flags & WFLG_WBENCHWINDOW)))
{
WBWin = WBWin->NextWindow;
}
Permit();
if (WBWin)
{
/* WB Backdrop window exists */
if(Toggle)
{
if (WBWin->Height < WBScreen->Height)
{
/* Enlarge the backdrop window so that picture covers all screen */
ChangeWindowBox(WBWin,
WBWin->LeftEdge,
0,
WBWin->Width,
WBScreen->Height);
}
/* Hide the workbench screen title bar */
ShowTitle(WBScreen, FALSE);
MakeOtherBackdropsVisible( WBScreen );
}
else
{
if (WBWin->Height == WBScreen->Height)
{
/* Reduce the backdrop window so that it is right under the title bar */
ChangeWindowBox(WBWin,
WBWin->LeftEdge,
(WBScreen->BarHeight+1),
WBWin->Width,
WBScreen->Height-(WBScreen->BarHeight+1));
WindowToBack(WBWin);
/* Show the workbench screen title bar */
ShowTitle(WBScreen, TRUE);
MakeOtherBackdropsVisible( WBScreen );
}
}
}
UnlockPubScreen(NULL, WBScreen);
}
}